<template>
  <div>
    MyLeft组件
    <div>
      count的值是{{ count }}
      <button @click="count++">+1</button>
    </div>
  </div>
</template>

<script setup>
import { ref, onMounted, onUnmounted, onActivated, onDeactivated } from "vue";

const count = ref(0);
onMounted(() => {
  console.log("MyLeft组件被挂载了");
});
onUnmounted(() => {
  console.log("MyLeft组件被销毁了");
});
onActivated(() => {
  console.log("MyLeft组件被激活了");
});
onDeactivated(() => {
  console.log("MyLeft组件被缓存了");
});
</script>

<style lang="scss" scoped></style>
